package com.zenith.storage.po.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.zenith.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 分片上传会话实体类
 * @author 22071
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sto_upload_session")
@Schema(name = "分片上传会话实体类",description = "分片上传会话实体类")
public class StorageUploadSession extends BaseEntity {

    /**
     * 存储提供商ID
     */
    @Schema(description = "存储提供商ID",name = "存储提供商ID")
    private Long providerId;

    /**
     * 前端上传唯一标识
     */
    @Schema(description = "前端上传唯一标识",name = "前端上传唯一标识")
    private String uploadKey;

    /**
     * 文件名
     */
    @Schema(description = "文件名",name = "文件名")
    private String fileName;

    /**
     * 文件大小（字节）
     */
    @Schema(description = "文件大小（字节）",name = "文件大小（字节）")
    private Long fileSize;

    /**
     * 分片大小(B)
     */
    @Schema(description = "分片大小(B)",name = "分片大小(B)")
    private Integer chunkSize;

    /**
     * 分片总数
     */
    @Schema(description = "分片总数",name = "分片总数")
    private Integer chunkTotal;

    /**
     * 文件MD5
     */
    @Schema(description = "文件MD5",name = "文件MD5")
    private String md5;

    /**
     * OSS 返回 uploadId
     */
    @Schema(description = "OSS 返回 uploadId",name = "OSS 返回 uploadId")
    private String uploadId;

    /**
     * 0-初始化 1-进行中 2-完成 3-失败 4-取消
     */
    @Schema(description = "0-初始化 1-进行中 2-完成 3-失败 4-取消",name = "0-初始化 1-进行中 2-完成 3-失败 4-取消")
    private Integer status;
}